<?php
	include("includes/secure.php");
	if ( isset ($_POST['ban_code']) && (int) $_POST['ban_code'] > 0){
		include("includes/config.php");
		include("includes/class/request.class.php");
	
		$myRequest = new MyRequest();
		
		$bankContactList = $myRequest->bankContactList($_POST['ban_code']);
		$countBankContactList = count ($bankContactList);
		
		$html = '<select name="baco_code" id="baco_code" class="text_grv" onchange="javascript: checkContactBank(this.value);">';
		$html .= '<option value="" selected="selected" disabled="disabled">select..</option>';
		for ($i = 0; $i < $countBankContactList; $i++)
			$html .= '<option value="'.$bankContactList[$i]->baco_code.'">'.$bankContactList[$i]->baco_name.'</option>';
		$html .= '<option value="-1">New contact bank..</option>';
		$html .= '</select>';			
		echo $html;
		
	}
	else
		echo -1;
?>